#include<stdio.h>
#include<stdlib.h>
int main()
{
	int n=0;
	scanf("%d",&n);
	int* p=(int*)malloc(n*sizeof(int));
	int sum=0;
	int average=0;
	for(int i=0;i<n;i++)
	{
		scanf("%d",(p+i));
		sum+=(*(p+i));
	}
	average=sum/n;
	printf("%d %d",sum,average);
	free(p);
	return 0;
} 
